<template>
  <ContainerTemplate
    v-bind="containerProps"
    v-model:isShowContainer="containerProps.isShowContainer"
    @do-operation="onContainerOperation"
  ></ContainerTemplate>
</template>
<script setup>
import { computed } from "vue";
import gdContainerService, {
  setContainerProps,
  toggleShowContainer,
} from "./gd-container-service";

import ContainerTemplate from "./container-template.vue";

const containerProps = gdContainerService();
const onContainerOperation = computed(() => {
  return (
    containerProps.value?.onDoOperation ?? (({ eventFrom, ...params }) => {})
  );
});

defineExpose({
  setContainerProps,
  toggleShowContainer,
});
</script>
